import React, {lazy, Suspense} from 'react';

import {Layout, Input} from 'antd';

const {Content} = Layout;


import {Route, Switch} from "react-router-dom";

const FrontContentMain = lazy(() => import('./FrontContentMain'));
const Content01 = lazy(() => import('./Content01'));
const Content02 = lazy(() => import('./Content02'));
const Content03 = lazy(() => import('./Content03'));



class FrontContent extends React.Component {
    render() {
        return (
            <Content style={{padding: '10px 50px', marginTop: 64}}>
                <div style={{background: '#fff', padding: 24, minHeight: 380}}>
                    <Suspense fallback={<div>Loading...</div>}>
                        <Switch>
                            <Route exact path={'/'} component={FrontContentMain}/>
                            <Route path={'/ai'} component={Content01}/>
                            <Route path={'/tools'} component={Content02}/>
                            <Route path={'/algorithm'} component={Content03}/>
                        </Switch>
                    </Suspense>
                </div>
            </Content>
        );
    }
}

export default FrontContent;